<!DOCTYPE html>

<!-- Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
     for details. All rights reserved. Use of this source code is governed by a
     BSD-style license that can be found in the LICENSE file. -->

<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Embeddings Demo</title>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

    <link href='https://fonts.googleapis.com/css?family=Inconsolata:400,700'
          rel='stylesheet' type='text/css'>

    <script defer src="../inject_embed.dart.js"></script>
    <style>
        .dartpad-embed > * {
            width: 100%;
        }

        iframe {
            border: 1px solid #bfbfbf;
            width: 100%;
            height: 600px;
            margin-bottom: 40px;
            margin-top: 40px;
        }
    </style>
</head>

<body>
<div class="container">
    <div class="col-md-10">
        <p>mode-flutter, theme-light, run-true, split-40, width-80%, height-800px</p>
        <pre>
            <code class="language-run-dartpad:theme-light:mode-flutter:run-true:split-40:width-80%:height-800px">
import 'package:flutter/material.dart';

Future main() async {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  MyApp();

  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State {
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(),
        body: Center(
          child: Container(
            child: Text('Hello, World!'),
          ),
        ),
      ),
    );
  }
}
            </code>
        </pre>

        <p>mode-flutter, theme-dark</p>
        <pre>
            <code class="language-run-dartpad:theme-dark:mode-flutter">
import 'package:flutter/material.dart';

Future main() async {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  MyApp();

  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State {
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: new ThemeData(
        brightness: Brightness.dark,
      ),
      home: Scaffold(
        appBar: AppBar(),
        body: Center(
          child: Container(
            child: Text('Hello, World!'),
          ),
        ),
      ),
    );
  }
}
            </code>
        </pre>

        <p>mode-dart</p>
        <pre>
            <code class="language-run-dartpad:mode-dart">
{$ begin main.dart $}
String message = 'Hello, World!';
{$ end main.dart $}

{$ begin solution.dart $}
String message = 'delete your code';
{$ end solution.dart $}

{$ begin test.dart $}
main() => print(message);
{$ end test.dart $}
            </code>
        </pre>

        <p>mode-html</p>
        <pre>
            <code class="language-run-dartpad:mode-html">
{$ begin main.dart $}
void main() {
  print("hello, world!");
}
{$ end main.dart $}

{$ begin index.html $}
<p>I'm a paragraph!</p>
{$ end index.html $}

{$ begin styles.css $}
p {
  font-family: monospace;
}
{$ end styles.css $}
            </code>
        </pre>
        <p>mode-inline</p>
        <pre>
            <code class="language-run-dartpad:mode-inline">
void main() {
  print("hello, world!");
}
            </code>
        </pre>

        <p>null_safety-true</p>
        <pre>
            <code class="language-run-dartpad:mode-flutter:null_safety-true:theme-dark">
void main() {
  int x = null; // Invalid with null safety enabled!
}
            </code>
        </pre>
    </div>
</div>
</body>
</html>
